<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>manage</title>
    <script src="__LAYUI__/layui.js"></script>
    <link href="__LAYUI__/css/layui.css" rel="stylesheet"/>
</head>
<body>

<table id="table" lay-filter="text"></table>


<script type="text/html" id="barDemo">
    <!--<a class="layui-btn layui-btn-mini" lay-event="detail">查看</a>-->
    <a class="layui-btn layui-btn-mini" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>

    <!--&lt;!&ndash; 这里同样支持 laytpl 语法，如： &ndash;&gt;-->
    <!--{{#  if(d.auth > 2){ }}-->
    <!--<a class="layui-btn layui-btn-mini" lay-event="check">审核</a>-->
    <!--{{#  } }}-->
</script>

<script>
    layui.use('table', function () {
        var table = layui.table;
        table.render({
            elem: 'table'
            ,
            page: true
            ,
            limit: 10
            ,
            skin: 'line'
            ,
            even: true
            ,
            size: 'lg'
            ,
            cols: [[
                {field: 'Id', title: 'ID', width: 50}
                , {field: 'username', title: '用户名', width: 200}
                , {field: 'level', title: '等级', width: 200}
                , {fixed: 'right', width: 160, align: 'center', toolbar: '#barDemo'}
            ]]
            ,
            data: [{"Id": 1, "username": "xp", "level": "0"}, {"Id": 2, "username": "xp", "level": "0"}, {
                "Id": 3,
                "username": "xp",
                "level": "0"
            }]
//            ,url:'https://127.0.0.1/index/Database/find'
        });
    });
</script>


</body>
</html>